package com.atguigu.boot;

import com.atguigu.boot.event.CustomListener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class Boot09HelloTestApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(Boot09HelloTestApplication.class, args);

        //这里注册事件监听器
        run.addApplicationListener(new CustomListener());

    }

}
